package com.itheima.io.inputstream.demo02;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

public class FileInputStreamDemo01 {

    public static void main(String[] args) throws IOException {

        InputStream inputStream = new FileInputStream("itheima-io-inputstream\\a.txt");

        byte[] bytes = new byte[1024];

        int len = -1;
        while ((len = inputStream.read(bytes)) != -1) {
            System.out.println(new String(bytes, 0, len));
        }

    }

}
